package com.example.operation.controller;

import com.example.operation.dto.SysDispatchDto;
import com.example.operation.service.SysDispatchService;
import com.example.operation.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "配送管理模块")
@RestController
@RequestMapping
public class SysDispatchController {

    @Autowired
    private SysDispatchService service;

    @ApiOperation(value = "配送管理接口")
    @PostMapping("/save")
    public Result<String> save(@RequestBody SysDispatchDto sysDispatchDto){
        service.save(sysDispatchDto);
        return Result.ok("配送信息新增成功");
    }
}
